chore: resolve remaining switch-exhaustiveness-check warnings#7113
Conversation
This stack of pull requests is managed by Graphite. Learn more about stacking. |
219a35f to
5617f2f
Compare
351844e to
d167d8f
Compare
b348343 to
a45bace
Compare
731c405 to
7d8f828
Compare
a45bace to
d9a2ee6
Compare
Coverage report
Test suite run success3993 tests passing in 1527 suites. Report generated by 🧪jest coverage report action from 5d67093 |
7d8f828 to
b23df55
Compare
d9a2ee6 to
62a7259
Compare
|
We detected some changes at Caution DO NOT create changesets for features which you do not wish to be included in the public changelog of the next CLI release. |
b23df55 to
ccb06f4
Compare
62a7259 to
4535e02
Compare
Fix all 20 remaining eslint warnings (switch-exhaustiveness-check): - fqdn.ts: file-level suppress — all switches branch on 'local' vs default (production). Tests mock serviceEnvironment() returning undefined, so explicit enum cases break tests. - scopes.ts: add explicit 'admin'|'storefront-renderer' cases that throw - output.ts: add missing 'silent' case to logLevelValue - tree-kill.ts: suppress — default handles all Unix-like platforms - mkcert.ts: suppress — default throws for unsupported platforms - Logs.tsx: replace default with explicit BackgroundExecutionReason.Unknown - execute-bulk-operation.ts: replace default with explicit error status cases - format-bulk-operation-status.ts: replace default with explicit status cases - extension.ts: replace default with explicit undefined|liquid|config-only - declarative-definitions.ts: replace defaults with explicit GraphQL enum cases - extension-config-builder.ts: replace default with explicit undefined case, use ?? instead of || for context fallback chain Combined with the parent PR, this brings the codebase from 107 warnings to 0. Co-authored-by: Claude Code <claude-code@anthropic.com>
4535e02 to
5d67093
Compare
| case BackgroundExecutionReason.CacheAboutToExpire: | ||
| return 'Cache is about to expire' | ||
| default: | ||
| case BackgroundExecutionReason.Unknown: |
There was a problem hiding this comment.
shoul'd we still have a default case here just in case? same in the others, why not a default?
There was a problem hiding this comment.
not having a default forces you to implement a caseif you add a new option to the Enum. The default would silently catch it.

WHY are these changes introduced?
Fixes #0000
WHAT is this pull request doing?
How to test your changes?
Post-release steps
Measuring impact
How do we know this change was effective? Please choose one:
Checklist